package com.ctshk.rpc.order.custom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderReceiptListDTO;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderReceiptListTouristDTO;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderReceiptListTouristPageDTO;
import com.ctshk.rpc.order.custom.entity.CustomizedOrderReceipt;
import com.ctshk.rpc.order.custom.provider.CustomOrderReceiptProvider;
import com.ctshk.rpc.order.custom.req.order.CustomOrderReceiptListTouristReq;
import com.ctshk.rpc.order.custom.req.order.OrderReceiptListReq;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.math.BigDecimal;

/**
 * <p>
 * 订单收据 Mapper 接口
 * </p>
 *
 * @author 叶冠峰
 * @since 2021-02-22
 */
public interface CustomizedOrderReceiptMapper extends BaseMapper<CustomizedOrderReceipt> {

    /**
     * 收據列表
     * @param page
     * @param req
     * @return
     */
    @SelectProvider(type = CustomOrderReceiptProvider.class, method = "selectListBySelective")
    IPage<CustomOrderReceiptListDTO> selectListBySelective(@Param("page") IPage<OrderReceiptListReq> page, @Param("req") OrderReceiptListReq req);

    /**
     * 打印收据-旅客列表-统计
     * @param req
     * @return
     */
    @SelectProvider(type = CustomOrderReceiptProvider.class, method = "selectCountListTouristBySelective")
    CustomOrderReceiptListTouristDTO selectCountListTouristBySelective(@Param("req") CustomOrderReceiptListTouristReq req);

    /**
     * 打印收据-旅客列表
     * @param req
     * @return
     */
    @SelectProvider(type = CustomOrderReceiptProvider.class, method = "selectListTouristBySelective")
    IPage<CustomOrderReceiptListTouristPageDTO> selectListTouristBySelective(IPage<CustomOrderReceiptListTouristReq> pageParam, @Param("req") CustomOrderReceiptListTouristReq req);

}
